package com.atguigu.daijia.customer.config;

import com.atguigu.daijia.customer.interceptor.CustomerlerInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author 山顶洞人郑某
 * @className WebMvcConfig.java
 * @date 2024 09 05
 */
@Component
public class WebMvcConfig implements WebMvcConfigurer {
    @Autowired
    private CustomerlerInterceptor customerlerInterceptor;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(customerlerInterceptor)
                .excludePathPatterns("/customer/login/{code}"); //排除
    }
}
